package com.valley.dream.tihai.view.fragment;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.valley.dream.tihai.R;
import com.valley.dream.tihai.presenter.ITypePresenter;
import com.valley.dream.tihai.presenter.impl.TypePresenterImpl;
import com.valley.dream.tihai.util.result.Result;


public class CommunityFragment extends Fragment {

    View root;
    ITypePresenter typePresenter = new TypePresenterImpl();

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        if (root == null){
            root = inflater.inflate(R.layout.fragment_community, container, false);
        }
        return root;
    }

    @Override
    public void onResume() {
        super.onResume();
        initView();
    }

    private void initView() {
        Result result = typePresenter.selectAllType(getActivity());
    }
}